Conversation
- @clerk/backend: ^1.25.2 -> ^2.33.0 - @clerk/express: ^1.3.53 -> ^1.7.76 (compatible with backend v2) - @clerk/testing: ^1.3.27 -> ^1.14.3 (compatible with backend v2) - @clerk/types: ^4.6.1/^4.48.0 -> ^4.101.20 Breaking changes addressed: - Replaced dist/api/endpoints import in clerk-client.mock.ts with ClerkClient type derivation (v2 exports map restricts deep imports) - Removed unused OrganizationMembershipRole import from ee.member.repository.ts JWT behavior verified: - JWT parsing uses passport-jwt with jwks-rsa directly (not Clerk SDK) - JwtPayload type from @clerk/types still exports org_id, org_role, org_permissions, org_slug at the top level - ClerkStrategy tests pass confirming JWT payload transformation is identical to v1 Co-authored-by: George Djabarov <djabarovgeorge@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
✅ Deploy preview added
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hey there and thank you for opening this pull request! 👋 We require pull request titles to follow specific formatting rules and it looks like your proposed title needs to be adjusted. Your PR title is: Requirements:
Expected format: Details: Available types:
|
What changed? Why was the change needed?
This PR upgrades the
@clerk/backendpackage from major version 1 to 2.Key changes include:
@clerk/backend:^1.25.2->^2.33.0@clerk/express:^1.3.53->^1.7.76(compatible with@clerk/backendv2)@clerk/testing:^1.3.27->^1.14.3(compatible with@clerk/backendv2)@clerk/types: Bumped to^4.101.20for consistency.libs/testing/src/ee/clerk-client.mock.tsto deriveOrganizationAPIandUserAPItypes fromClerkClientas direct deep imports (@clerk/backend/dist/api/endpoints) are no longer exposed in v2.OrganizationMembershipRoleimport from.source/auth/src/repositories/ee.member.repository.ts.The upgrade was needed to move the project to the latest major version of
@clerk/backend, ensuring all necessary migration steps were applied and existing JWT token behavior was preserved.Screenshots
N/A
Expand for optional sections
Related enterprise PR
A corresponding branch
cursor/clerk-backend-v2-010ehas been pushed tonovuhq/packages-enterprise. A PR will need to be created and merged there first.Special notes for your reviewer
passport-jwtwithjwks-rsafor JWT validation, which is independent of the@clerk/backendSDK version. TheJwtPayloadstructure (includingorg_id,org_role,org_permissions) remains consistent.Slack Thread